package com.aaa.service.back.Impl;

import com.aaa.entity.Category;
import com.aaa.entity.GoodsSize;
import com.aaa.mapper.back.CategoryMapper;
import com.aaa.service.back.CategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class CategoryServiceIMpl implements CategoryService {
    @Resource
    private CategoryMapper categoryMapper;

    @Override
    public List<Map<String, Object>> findCategory() {
        return categoryMapper.findCategory();
    }

    @Override
    public Map<String, Object> findCategoryBuCategoryId(Integer categoryId) {
        return categoryMapper.findCategoryBuCategoryId(categoryId);
    }

    @Override
    public int addCategory(Category category) {
        return categoryMapper.addCategory(category);
    }

    @Override
    public int editCategory(Category category) {
        return categoryMapper.editCategory(category);
    }

    @Override
    public Map<String, Object> findGoodsSizeByGoodsSizeId(Integer goodsSizeId) {
        return categoryMapper.findGoodsSizeByGoodsSizeId(goodsSizeId);
    }

    @Override
    public int addGoodsSize(GoodsSize goodsSize) {
        return categoryMapper.addGoodsSize(goodsSize);
    }

    @Override
    public int editGoodsSize(GoodsSize goodsSize) {
        return categoryMapper.editGoodsSize(goodsSize);
    }
}
